<template>
    <div>
        <el-button v-bind="$attrs" :loading="loading" @click="handleClick">
            <slot></slot>
        </el-button>
    </div>
</template>
<script>
import { mapState } from 'vuex';
export default {
    name: 'BackBtn',
    computed: {
        ...mapState({
            loading: state => state.loading
        })
    },
    methods: {
        handleClick() {
            this.$emit('click')
        }
    }

}
</script>
<style lang="scss" scoped></style>